package com.vecspace.web.servlet.model;

import java.util.HashMap;
import java.util.Map;


public abstract class ViewModel {
	private String viewPath;
	private Map<String,Object> model;
	
	public ViewModel(String viewPath, Map<String,Object> params){
		setViewPath(viewPath);
		setModel(params);
	}

	public String getViewPath() {
		return viewPath;
	}

	public void setViewPath(String viewPath) {
		this.viewPath = viewPath;
	}

	public Map<String, Object> getModel() {
		return model;
	}

	public void setModel(Map<String, Object> model) {
		if(model == null) {
			model = new HashMap<>();
		}
		this.model = model;
	}
	
	
}
